﻿//------------------------------------------------------------------------------
// <copyright file="IPepperService.cs" company="Robert MacLean">
//      Copyright © Robert MacLean.  All Rights Reserved.
// </copyright>
//
//  Details on this see: http://pepper.codeplex.com
//  This code released under the terms of the 
//  Microsoft Public License  (MS-PL, http://opensource.org/licenses/ms-pl.html.)
//------------------------------------------------------------------------------

namespace Pepper
{
    using System;
    using System.ServiceModel;
    using Pepper.Exceptions;

    [ServiceContract]
    public interface IPepperService
    {
        [OperationContract]
        [FaultContract(typeof(InvalidCredentialsFault))]
        Guid Login(string emailAddress, string passwordHash);

        [OperationContract]
        [FaultContract(typeof(InvalidCredentialsFault))]
        [FaultContract(typeof(NoSettingsFault))]
        Tuple<byte[], string> LoadSettings(Guid userId, string passwordHash);

        [OperationContract]
        [FaultContract(typeof(InvalidCredentialsFault))]
        void SaveSettings(Guid userId, string passwordHash, byte[] settings, string settingsHash);        
    }
}
